home *** CD-ROM | disk | FTP | other *** search
- // Source code for Klingon Clock. Copyright (C) 1996-1997
- // Charles H. Hemstreet IV
- //
- // Started at MacHack 1996
- // Completed at MacHack 1997
- //
- // Best thanks to:
- // My wife Regie, son Chad and baby
- // Other thanks to Elden Wood and Bob Clark
- //
- // This code is distributed "as-is" and implies no warranty or guarantee.
-
-
- #ifndef __MAIN__
- #include "main.h"
- #endif
-
-
- void main(void)
- {
- InitApp();
- RunApp();
- QuitApp();
- }
-
-
- void InitApp(void)
- {
- OSErr initAppErr;
-
- Initialize();
- gestaltChecks();
-
- initAppErr = DoInstallAEHandlers();
- if (initAppErr)
- {
- SysBeep(1); // Beep once but do not die. Just means we can shut down via AE's later.
- }
-
- initAppErr = doSuccessSound();
- assert(initAppErr == noErr);
- }
-
-
- void RunApp(void)
- {
- while (!gExitNow)
- {
- GrabAndDoEvent();
- }
- }
-
-
- void QuitApp(void)
- {
- DoDeallocateEverything();
- }
-